# -*- coding: utf-8 -*-
"""
    Created by huangyi at 2020/7/30.
    Description:
    Changelog: all notable changes to this file will be documented
"""
from app.runtime import runtime
from app.expression.context import Context
from app.expression.nonterminal.func.func import Func
from app.expression.nonterminal.func.int import Int


class LastLoginTime(Func):

    def get_name(self) -> str:
        return "last_login_time"

    def calc(self, ctx: Context, *param):
        return '2020-01-01 00:00:00'


if __name__ == '__main__':

    rt = runtime.new()
    rt.add_func(Int())
    result = rt.exec("int('10')")
    print(result)
